﻿<%@ Page Language="C#" AutoEventWireup="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["error"] != null)
            {
                try
                {
                    WebLibs.SystemMessage objMess = Session["error"] != null ? (WebLibs.SystemMessage)Session["error"] : new WebLibs.SystemMessage("Lỗi hệ thống!", "Default.aspx", "");
                    Session.Remove("error");

                    lblMess.Text = objMess.strContext;
                    objMess.MailToSystem();
                    cmdReturn.OnClientClick = "window.location='" + objMess.strLink + "';return false;";
                }
                catch
                {
                    CoreLibs.SystemError objMess = Session["error"] != null ? (CoreLibs.SystemError)Session["error"] : new CoreLibs.SystemError("Lỗi hệ thống!", null, "Default.aspx");
                    Session.Remove("error");

                    lblMess.Text = objMess.Title;
                    cmdReturn.OnClientClick = "window.location='" + objMess.Link + "';return false;";
                }
            }
            else
            {
                lblMess.Text = "Không lấy được nội dung lỗi";
                cmdReturn.OnClientClick = "window.location='Default.aspx';return false;";
            }
        }
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Notification</title>
</head>
<body>
    <form id="form1" runat="server">
        <table border="0" width="100%" style="height: 400px">
            <tr>
                <td align="center" valign="middle">
                    <asp:Panel ID="pnlMessage" Style="padding-bottom: 15px;" runat="server" Height="100%"
                        Width="300px" HorizontalAlign="Center" BorderColor="Black" BorderWidth="1px">
                        <div style="width: 100%; font-weight: bold; font-size: 13px; color: white; font-family: verdana;
                            background-color: #000000; height: 25px; padding-top: 5px;">
                            Notification
                        </div>
                        <div style="padding-top: 10px; padding-bottom: 10px;">
                            <asp:Label ID="lblMess" runat="server" />
                        </div>
                        <div>
                            <asp:Button ID="cmdReturn" runat="server" CssClass="Control_Button0" Text="Quay lại" />
                        </div>
                    </asp:Panel>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
